package com.wonking.springbootv2.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wonking.springbootv2.service.RedisService;

@RestController
@RequestMapping("/redis")
public class RedisController {
	
	@Autowired
	private RedisService redisService;
	

	@GetMapping("/test")
	public String test(){
		 
		redisService.setValue("key1", "value");
		return (String)redisService.getValue("key1");
	}
}
